<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html><head>
<title>corepui</title>
</head><body>
<p>[<a href="mxdoc.htm">mainpage</a>]
[<a href="tags.htm">tags</a>]<br>
<h1><a name="corepui">module: corepui</a></h1><p><b>Core DEPUI functions</b><p>
This module is the core DEPUI module.  It contains code for:
<ul>
<li>DEPUI startup functions</li>
<li>Handling of events</li>
<li>Setting the theme</li>
<li>Setting the default font</li>
<li>Handling of basic gui objects (base objects, text objects, buttons, 
    windows, window borders and the root window</li>
<li>Finding out what portions of an object are visible and getting the theme 
    to draw them.</li>
</ul>
 
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p>Part of the <a href="depui.htm">depui</a> library.<ul><li>
<a name="MX_EVENT"><code>MX_EVENT</code></a>
<p>
<p><b>Event types  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_event(o,t,d,l)"><code># define mx_event(o,t,d,l)</code></a>
<p>
<p><b>Send an event</b><p>
This macro sends an event to an object.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_eventmatch(e,o)"><code># define mx_eventmatch(e,o)</code></a>
<p>
<p><b>Check if two events match with type and destination</b><p>
This macro is useful in window event handler to recognize events for
different objects.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_dirty(o,c)"><code># define mx_dirty(o,c)</code></a>
<p>
<p><b>Mark an object for later redraw</b><p>
This macro marks an object derived from MX_OBJ and optionally its
children as for later redraw.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXOBJ(o)"><code># define MXOBJ(o)</code></a>
<p>
<p><b>Convert to base MX_OBJ class  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXID(o)"><code># define MXID(o)</code></a>
<p>
<p><b>Get an objects ID number</b><p>
This macro returns the id number associated with an object.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXCLASS(o)"><code># define MXCLASS(o)</code></a>
<p>
<p><b>Return an objects class  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_x(o)"><code># define mx_x(o)</code></a>
<p>
<p><b>Return the X-coordinate of an MX_OBJ  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_y(o)"><code># define mx_y(o)</code></a>
<p>
<p><b>Return the Y-coordinate of an MX_OBJ  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_place(o,r)"><code># define mx_place(o,r)</code></a>
<p>
<p><b>Place an MX_OBJ at a given recyangle  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_position(o,x,y,w,h)"><code># define mx_position(o,x,y,w,h)</code></a>
<p>
<p><b>Position an MX_OBJ at given coordinates  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_move(o,x,y)"><code># define mx_move(o,x,y)</code></a>
<p>
<p><b>Move an MX_OBJ to a given poistion  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_resize(o,w,h)"><code># define mx_resize(o,w,h)</code></a>
<p>
<p><b>Resize an MX_OBJ to a given width and height  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_geometry(o)"><code># define mx_geometry(o)</code></a>
<p>
<p><b>Make an object check/correct its geometry</b><p>
This macro causes a MX_GEOMETRY event to be sent to an object.  The
object should do any internal processing necessary so the object functions properly
with the current poistion and size.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="MX_RECT* mx_defaultrect_data(void)"><code>MX_RECT* mx_defaultrect_data(void)</code></a>
<p>
<p><b>Get default rect informatoin</b><p>
When handling a MX_DEFAULTRECT event, and object can call this function to
get information as to where to put the default rect information.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<br>
During handling the MX_DEFAULTRECT event an object should call this
function to indicate its desired area.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function should only be called while handling an MX_DEFAULTRECT event.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name=" define mx_defaultrect(o,r)"><code># define mx_defaultrect(o,r)</code></a>
<p>
<p><b>Find out what size/position and object wants to have</b><p>
This macro causes a MX_DEFAULTRECT event to be sent to an object derived
from MX_OBJ.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_layout(o,f,r,x,y)"><code># define mx_layout(o,f,r,x,y)</code></a>
<p>
<p><b>Set the layout of an MX_OBJ  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_armed(o)"><code># define mx_armed(o)</code></a>
<p>
<p><b>Return if an MX_OBJ is armed or not  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_selected(o)"><code># define mx_selected(o)</code></a>
<p>
<p><b>Return if an MX_OBJ is selected or not  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_select(o,s)"><code># define mx_select(o,s)</code></a>
<p>
<p><b>Select an MX_OBJ  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_disable(o,d)"><code># define mx_disable(o,d)</code></a>
<p>
<p><b>Disable an MXOBJ   </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_disabled(o)"><code># define mx_disabled(o)</code></a>
<p>
<p><b>Return if a MX_OBJ is disabled or not  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_wantmove(o,w)"><code># define mx_wantmove(o,w)</code></a>
<p>
<p><b>Determine if an object recieves MX_POINTER_MOVE events  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_wantpointer(o,w)"><code># define mx_wantpointer(o,w)</code></a>
<p>
<p><b>Determine if an object will recieve MX_POINTER_* events  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_haspointer(o)"><code># define mx_haspointer(o)</code></a>
<p>
<p><b>Determine if an object has the pointer  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_wantfocus(o,w)"><code># define mx_wantfocus(o,w)</code></a>
<p>
<p><b>Determine if an object wants the focus or not</b><p>
This function return non-zero if the focus was changed.  In this case the
object probaly needs to be marked as dirty.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_focused(o)"><code># define mx_focused(o)</code></a>
<p>
<p><b>Return if an MX_OBJ is focused or not  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_focus_default(o)"><code># define mx_focus_default(o)</code></a>
<p>
<p><b>Set a object to be the default focus object</b><p>
This function returns non-zero if the object immediatly received the focus
 i.e. no other object has the focus at that moment.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_obj_class(void)"><code>void mx_obj_class(void)</code></a>
<p>
<p><b>Class function for MX_OBJECT  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_obj(o,c,s,p,i)"><code># define mx_obj(o,c,s,p,i)</code></a>
<p>
<p><b>Construct an MX_OBJ object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXTEXTUAL(o)"><code># define MXTEXTUAL(o)</code></a>
<p>
<p><b>Convert to MX_TEXTUAL base class  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text_set(o,t,l,f)"><code># define mx_text_set(o,t,l,f)</code></a>
<p>
<p><b>Set the text of a MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text_setcopy(o,t,l)"><code># define mx_text_setcopy(o,t,l)</code></a>
<p>
<p><b>Set the text of a MX_TEXTUAL object to a copy of some text  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text_font(o,f)"><code># define mx_text_font(o,f)</code></a>
<p>
<p><b>Set the font associated with the MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text(o,l)"><code># define mx_text(o,l)</code></a>
<p>
<p><b>Return the text of a MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text_align(o,a)"><code># define mx_text_align(o,a)</code></a>
<p>
<p><b>Set the alignment associated with the MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_text_align_get(o)"><code># define mx_text_align_get(o)</code></a>
<p>
<p><b>Return the alignment associated with the MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_textual_class(void)"><code>void mx_textual_class(void)</code></a>
<p>
<p><b>Class function for MX_TEXTUAL  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_textual(m,s,p,i)"><code># define mx_textual(m,s,p,i)</code></a>
<p>
<p><b>Construct a MX_TEXTUAL object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXBUTTON(o)"><code># define MXBUTTON(o)</code></a>
<p>
<p><b>Convert to MX_BUTTON base class  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_button_class(void)"><code>void mx_button_class(void)</code></a>
<p>
<p><b>Class function for MX_BUTTON  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_button(m,s,p,i)"><code># define mx_button(m,s,p,i)</code></a>
<p>
<p><b>Construct a button  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="typedef void (*MX_HANDLER) (struct MX_WIN* win);"><code>typedef void (*MX_HANDLER) (struct MX_WIN* win);</code></a>
<p>
<p><b>Event handler</b><p>
Functions of this type are assoctaied with windows.  These functions process
all events bieng passed to all objects within the window.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="MX_WIN"><code>MX_WIN</code></a>
<p>
<p><b>A window object  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define MXWIN(o)"><code># define MXWIN(o)</code></a>
<p>
<p><b>Convert to base MX_WIN class</b><p>
This macro does a typesafe conversion between an object derived from MX_WINDOW
and the underlying window.  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_win_class(void)"><code>void mx_win_class(void)</code></a>
<p>
<p><b>Class function for MX_WIN  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_win_handler(MX_WIN* win)"><code>void mx_win_handler(MX_WIN* win)</code></a>
<p>
<p><b>The default window handler function  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<br>
!The default window handler  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="void mx_default_handler(void)"><code>void mx_default_handler(void)</code></a>
<p>
<p><b>The default window handler function  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<br>
!The default window handler  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If any object of a window is pressed, the window is brought to the top.   
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function passes the event to the desination object.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name=" define mx_win(w,s,h,i)"><code># define mx_win(w,s,h,i)</code></a>
<p>
<p><b>Construct a standard window (and border)  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_basicwin(w,s,h,i)"><code># define mx_basicwin(w,s,h,i)</code></a>
<p>
<p><b>Construct a basic window (no boprder)  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_active(w)"><code># define mx_active(w)</code></a>
<p>
<p><b>Is window active?</b><p>
This function returns non-zero if an object derivded from MX_WIN is the
active window.  This macro is just a wrapper for mx_win_active().  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_dirty(w)"><code># define mx_win_dirty(w)</code></a>
<p>
<p><b>Mark a window for later redraw</b><p>
This function marks a window and its border for redraw  
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_modal(w)"><code># define mx_modal(w)</code></a>
<p>
<p><b>Make a window modal</b><p>
This macro marks a window as modal. This means that no interaction can take
place with a parent window while a child modal window is open.   
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="void mx_winborder_class(void)"><code>void mx_winborder_class(void)</code></a>
<p>
<p><b>Class function for MX_WINBORDER  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_winborder(b,s,o,i)"><code># define mx_winborder(b,s,o,i)</code></a>
<p>
<p><b>Create a border for a window  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_noresize(w,res)"><code># define mx_win_noresize(w,res)</code></a>
<p>
<p><b>Make a window resizeable/unresizable  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_noclose(w,res)"><code># define mx_win_noclose(w,res)</code></a>
<p>
<p><b>Make a window closeable/uncloseable  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_nomove(w,res)"><code># define mx_win_nomove(w,res)</code></a>
<p>
<p><b>Make a window moveable/unmoveable  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_notitle(w,res)"><code># define mx_win_notitle(w,res)</code></a>
<p>
<p><b>Make a window have no title  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name=" define mx_win_rootchild(w)"><code># define mx_win_rootchild(w)</code></a>
<p>
<p><b>Make a window a child of the root window  </b><p>
(<a href="../include/depui/corepui.h">../include/depui/corepui.h</a>)<p></li>
<li>
<a name="unsigned int mx_emit(MX_EVENT event, const void* data, unsigned int datalen)"><code>unsigned int mx_emit(MX_EVENT event, const void* data, unsigned int datalen)</code></a>
<p>
<p><b>Emit an event to parent object</b><p>
This function informs the current objects parent of an event.  This is
indended for very local communication.  This is used between scrollbars (MX_SLIDER) 
and scrollabale areas (MX_SCROLL) to indicate movement of the scrollbar.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="unsigned int mx_inform(MX_EVENT event, const void* data, unsigned int datalen)"><code>unsigned int mx_inform(MX_EVENT event, const void* data, unsigned int datalen)</code></a>
<p>
<p><b>Inform parent window of event</b><p>
This function passes an event to a parent window of the object/window
currently handling an event.  This is intended for child windows to pass
events to thier parents without explicitly knowing who thier parent are.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="void mx_answer(unsigned int answer)"><code>void mx_answer(unsigned int answer)</code></a>
<p>
<p><b>Set the answer to an event</b><p>
This function sets the return value of the event.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function does not force an end to event handling, you have to do that
        by returning from the event handler.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If this function is called twice during the handling of the event then
        the first return value is forgotten and the last one is used.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="void mx_theme_set(const MX_THEME* theme)"><code>void mx_theme_set(const MX_THEME* theme)</code></a>
<p>
<p><b>Set the current theme</b><p>
This function changes the current theme.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function does nothing if the requested theme is already being used.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The current theme is stopped before trying the new one.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the new theme cannot be started the previous theme is restarted.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If both the new theme and the previous theme can't be started the
    default theme for the platform is found and started.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)
<p>If we get here then NO themes, not even the default, work
        anymore.  Indicate some kind of (platform specific?) fatal error.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>When the new theme is started successfully, all objects in the
        main tree get an MX_THEME_CHANGE event so that they can change their
        sizes or geometry to handle the new theme properly.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="MX_GUIFONT* mx_guifont_load(const char* filename, const char* text)"><code>MX_GUIFONT* mx_guifont_load(const char* filename, const char* text)</code></a>
<p>
<p><b>Load a gui font from a file</b><p>
The request is passed on to the platform code and the DEPUI core code
keeps track of what fonts are in use and what fonts need deleting.   
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="MX_GUIFONT* mx_guifont_index(int i)"><code>MX_GUIFONT* mx_guifont_index(int i)</code></a>
<p>
<p><b>Returns the available gui fonts.  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>Pass a number less than 0 and the default font will be returned.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>Lower indicies return platform builtin fonts.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>Higher indicies return platform loaded fonts.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>Too high indicies returns 0.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="const char* mx_guifont_text(const MX_GUIFONT* guifont)"><code>const char* mx_guifont_text(const MX_GUIFONT* guifont)</code></a>
<p>
<p><b>Get font desriptive text</b><p>
This function return a portion of descriptive text for a font put there
by the platform code.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="void mx_guifont_default(MX_GUIFONT* guifont)"><code>void mx_guifont_default(MX_GUIFONT* guifont)</code></a>
<p>
<p><b>Set the default gui font  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="const MX_POINTER_INFO* mx_pointer_info(void)"><code>const MX_POINTER_INFO* mx_pointer_info(void)</code></a>
<p>
<p><b>Returns pointer information  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>It can be called at any time.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="unsigned mx_pointer_hold(void)"><code>unsigned mx_pointer_hold(void)</code></a>
<p>
<p><b>Hold the pointer</b><p>
If the object handling the current event is pointed to by the pointer 
then the object will keep recieving pointer messages even if the pointer 
leaves the object.  This can be 'turned off' by calling <code>mx_pointer_release()
</code>.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the current object does not have the pointer then this function does nothing.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function return non-zero if the pointer has been successfully held.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="unsigned mx_pointer_release(void)"><code>unsigned mx_pointer_release(void)</code></a>
<p>
<p><b>Release the pointer</b><p>
If the object handling the current event has the pointer held using
<code>mx_pointer_hold()</code> then this function 'releases' the pointer.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the current object is not holding the pointer then this function does nothing.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function return non-zero if the pointer has been successfully released.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="const MX_KEY_INFO* mx_key_info(void)"><code>const MX_KEY_INFO* mx_key_info(void)</code></a>
<p>
<p><b>Return keypress information.  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function should only be called when handling a MX_KEY or MX_KEY_UNUSED event.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="static void mx__destroy(void* atom)"><code>static void mx__destroy(void* atom)</code></a>
<p>
<p>Should drawing be done in destructor?
        if (mx_tree_parent(obj))
                mx_platform_dirty(MXRECT(obj));  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="const MX_RECT* mx_expose_rect(void)"><code>const MX_RECT* mx_expose_rect(void)</code></a>
<p>
<p>While handling an MX_EXPOSE event we can find out what area of the
screen is being exposed.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="unsigned mx_exposing(void)"><code>unsigned mx_exposing(void)</code></a>
<p>
<p>This function can only be used while handling an MX_EXPOSE event.  It
determines wether we are actually exposing the object or are just pretending
to expose so that we can find out what portions of the screen are used by the
object.  This function should probably not be used by end users, only by
theme designers.   
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="static void mx__expose(MX_OBJ_DATA* obj, const MX_RECT* rect)"><code>static void mx__expose(MX_OBJ_DATA* obj, const MX_RECT* rect)</code></a>
<p>
<p>MX_EXPOSE events dont get passed to
        the window handler.  Instead they go directly to the object class
        function.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="void mx_expose_background(const MX_RECT* rect)"><code>void mx_expose_background(const MX_RECT* rect)</code></a>
<p>
<p>This function can be used while handling an MX_EXPOSE event to tell
the drawing code to make sure that underlying objects are drawn first.  This
is necessary when drawing transparent or non-rectangular objects.  This function
is probably only useful for theme designers. 
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="unsigned mx_start(void)"><code>unsigned mx_start(void)</code></a>
<p>
<p><b>The initialization function for DEPUI.  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If DEPUI has already been started then this function does nothing.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The default theme is started.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The default and built-in fonts are loaded.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The root window is created.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>This function returns non-zero if initialization succeeded.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
<li>
<a name="int mx_execute(void)"><code>int mx_execute(void)</code></a>
<p>
<p><b>The main gui loop for DEPUI  </b><p>
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the gui has not yet been initialized with mx_start() this function
    calls mx_start() now.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If this function is being called recursively it returns immediately.
    This possibility makes the source code for a simple main gui function and
    launching a gui window to be exactly the same.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The first time this function is called it loops until the gui is closed.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the screen dimensions change between interation of the main gui
        loop then the root object is adjusted to fill the entire screen and
        the entire screen is marked for redrawing.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>The guimain loop will stop if there are no child objects.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the pointer is moved over an object and that object has
            called mx_obj_wantmove(true) then the object will recieve a
            MX_POINTER_MOVE event whenever the pointer moves over the object.
            See the function mx_obj_wantmove().  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If an object calls mx_pointer_hold() the the object
                will continue recieving pointer messages even after the pointer
                actually leaves the area of the object on screen.  See the function
                mx_pointer_hold().  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the pointer enters or leaves the area of the object on screen
            then the appropriate object recieve MX_POINTER_LEAVE and MX_POINTER_ENTER
            events.  These event do not occur if an object has called mx_pointer_hold().  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If the pointer is pressed or released then the approriate object
            recieves MX_POINTER_PRESS or MX_POINTER_RELEASE events.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)

<p>If a key is pressed the focus object gets a MX_KEY event.  If the
            focus object uses the key then it should return non-zero from the event
            handler (see function mx_answer()).  If event handler return zero then
            the objects window will recieve a MX_KEY_UNUSED event.  
(<a href="../include/depui/corepui.c">../include/depui/corepui.c</a>)<p></li>
</ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb  4 15:16:27 2007


</body></html>
